package com.kaishengit.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.kaishengit.core.dao.BaseDao;
import com.kaishengit.pojo.City;

@Repository
public class CityDao extends BaseDao<City,String>{

	@SuppressWarnings("unchecked")
	public List<City> findByProvinceId(String provinceId) {
		String hql = "from City where provinceid =?";
		Query query = getSession().createQuery(hql);
		query.setParameter(0, provinceId);
		return query.list();
		
	}

}
